package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @GetMapping("/echo")
    public Object echo() {
        Map<String, Object> map = new HashMap<>();
        map.put("code", "succ");
        map.put("errMsg", "This is success message");
        map.put("data", new HashMap<>());
        return map;
    }

}
